<body class="gray-bg">
<div class="ibox-content">
    <form class="form-horizontal" method="post" action="{:url('AdsList/edit')}">
        <input type="hidden" name="id" value="{$info.id|default='0'}">
        <div class="form-group">
            <label class="col-sm-2 control-label">广告名称</label>
            <div class="col-sm-10">
                <input name="title" class="form-control" type="text" placeholder="请输入广告名称" value="{$info.title|default=''}"/>
                <span class="help-block m-b-none"></span></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">广告类型</label>
            <div class="col-sm-10">
                <div class="radio radio-info radio-inline">
                    <input type="radio" id="inlineRadio1" value="0" name="ads_type" {if condition="$info['ads_type'] eq '0'"} checked {/if}>
                    <label for="inlineRadio1"> 图片 </label>
                </div>
                <div class="radio radio-info radio-inline">
                    <input type="radio" id="inlineRadio2" value="1" name="ads_type" {if condition="$info['ads_type'] eq '1'"} checked {/if}>
                    <label for="inlineRadio2"> 文本 </label>
                </div>
                <div class="radio radio-info radio-inline">
                    <input type="radio" id="inlineRadio3" value="2" name="ads_type" {if condition="$info['ads_type'] eq '2'"} checked {/if}>
                    <label for="inlineRadio3"> 代码 </label>
                </div>
                <span class="help-block m-b-none"></span></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">时间限制</label>
            <div class="col-sm-10">
                <div class="radio radio-info radio-inline">
                    <input type="radio" id="inlineRadio4" value="0" name="set_time" {if condition="$info['set_time'] eq '0'"} checked {/if}>
                    <label for="inlineRadio4"> 永不过期 </label>
                </div>
                <div class="radio radio-info radio-inline">
                    <input type="radio" id="inlineRadio5" value="1" name="set_time" {if condition="$info['set_time'] eq '1'"} checked {/if}>
                    <label for="inlineRadio5">  在设内时间内有效 </label>
                </div>
                <span class="help-block m-b-none"></span></div>
        </div>


        <div class="form-group">
            <label class="col-sm-2 control-label">广告图片 </label>
            <div class="col-sm-10">
                <div class="form-control-static">
                    {assign name="litpic" value="$info.litpic|default=''" /}
                    {:hook('File', ['name' => 'litpic', 'value' => $litpic, 'type' => 'img'])}</div>
                <span class="help-block m-b-none"></span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">广告图片(手机) </label>
            <div class="col-sm-10">
                <div class="form-control-static">
                    {assign name="litpic2" value="$info.litpic2|default=''" /}
                    {:hook('File', ['name' => 'litpic2', 'value' => $litpic2, 'type' => 'img'])}
                </div>
                <span class="help-block m-b-none"></span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">广告链接</label>
            <div class="col-sm-10">
                <input name="links" class="form-control" type="text" placeholder="请输入广告链接地址" value="{$info.links|default=''}"/>
                <span class="help-block m-b-none"></span></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">广告内容</label>
            <div class="col-sm-10">
                <textarea name="intro" class="form-control" placeholder="广告注释：支持HTML">{$info.intro|default=''}</textarea>
                <span class="help-block m-b-none">当广告类型为文本/代码时，这里请填写广告代码，支持html代码</span></div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-8">
                {include file="admin@layout/save_btn"}
            </div>
        </div>
    </form>
</div>